<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/pages/home.xhtml">
	<ui:define name="conteudo">
		<p:tabMenu activeIndex="1">
			<p:menuitem value="Empréstimo" url="emprestimo.jsf" />
			<p:menuitem value="Leitor" url="leitor.jsf" />
			<p:menuitem value="Livro" url="livro.jsf" />
			<p:menuitem value="Autor" url="autor.jsf" />
			<p:menuitem value="Editora" url="editora.jsf" />
			<p:menuitem value="Classificação" url="classificacao.jsf" />
		</p:tabMenu>
		<h:form>
			<h:panelGrid id="painel" columns="3" cellpadding="4">
				<h:outputLabel value="Nome" />
				<p:inputText value="#{MBLeitor.beanLeitor.leiNome}" id="nome"
					required="true" requiredMessage="Campo obrigatório." />
				<p:message for="nome" />
				<h:outputLabel value="Endereço" />
				<p:inputText value="#{MBLeitor.beanLeitor.leiEndereco}"
					id="endereco" required="true" requiredMessage="Campo obrigatório." />
				<p:message for="endereco" />
				<h:outputLabel value="Bairro" />
				<p:inputText value="#{MBLeitor.beanLeitor.leiBairro}" id="bairro"
					required="true" requiredMessage="Campo obrigatório." />
				<p:message for="bairro" />
				<h:outputLabel value="Cidade" />
				<p:inputText value="#{MBLeitor.beanLeitor.leiCidade}" id="cidade"
					required="true" requiredMessage="Campo obrigatório." />
				<p:message for="cidade" />
				<h:outputLabel value="UF" />
				<p:selectOneMenu value="#{MBLeitor.beanLeitor.leiEstado}"
					id="estado" required="true" requiredMessage="Campo obrigatório.">
					<f:selectItem itemLabel="---" itemValue="" />
					<f:selectItem itemLabel="AC" itemValue="AC" />
					<f:selectItem itemLabel="AL" itemValue="AL" />
					<f:selectItem itemLabel="AP" itemValue="AP" />
					<f:selectItem itemLabel="AM" itemValue="AM" />
					<f:selectItem itemLabel="BA" itemValue="BA" />
					<f:selectItem itemLabel="CE" itemValue="CE" />
					<f:selectItem itemLabel="DF" itemValue="DF" />
					<f:selectItem itemLabel="ES" itemValue="ES" />
					<f:selectItem itemLabel="GO" itemValue="GO" />
					<f:selectItem itemLabel="MA" itemValue="MA" />
					<f:selectItem itemLabel="MT" itemValue="MT" />
					<f:selectItem itemLabel="MS" itemValue="MS" />
					<f:selectItem itemLabel="MG" itemValue="MG" />
					<f:selectItem itemLabel="PA" itemValue="PA" />
					<f:selectItem itemLabel="PB" itemValue="PB" />
					<f:selectItem itemLabel="PR" itemValue="PR" />
					<f:selectItem itemLabel="PE" itemValue="PE" />
					<f:selectItem itemLabel="PI" itemValue="PI" />
					<f:selectItem itemLabel="RJ" itemValue="RJ" />
					<f:selectItem itemLabel="RN" itemValue="RN" />
					<f:selectItem itemLabel="RS" itemValue="RS" />
					<f:selectItem itemLabel="RO" itemValue="RO" />
					<f:selectItem itemLabel="RR" itemValue="RR" />
					<f:selectItem itemLabel="SC" itemValue="SC" />
					<f:selectItem itemLabel="SP" itemValue="SP" />
					<f:selectItem itemLabel="SE" itemValue="SE" />
					<f:selectItem itemLabel="TO" itemValue="TO" />
				</p:selectOneMenu>
				<p:message for="estado" />
				<p:commandButton value="Salvar" action="#{MBLeitor.alterar()}"
					update="painel" />
				<p:commandButton value="Cancelar" action="leitor" immediate="true" />
			</h:panelGrid>
		</h:form>
	</ui:define>
</ui:composition>
</html>